<!-- hotNews_frame.html -->
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
		<meta name="format-detection" content="telephone=no, email=no, date=no, address=no">
		<title>回复列表win</title>
		<link rel="stylesheet" type="text/css" href="css/api.css"/>
	    <link rel="stylesheet" type="text/css" href="css/mui.min.css">
	    <link rel="stylesheet" href="./css/base.css">
		<link rel="stylesheet" type="text/css" href="css/news.css">
	</head>
	<body>
		<ul class="mui-table-view" id="div_zixun">

		</ul>
	</body>
	<script type="text/javascript" src="script/api.js"></script>
	<script type="text/javascript" src="script/jquery.min.js"></script>
	<script type="text/javascript" src="script/common.js"></script>
	<script type="text/javascript">
		var zixun_data  = new Array();
		apiready = function() {
			zixun_data = api.pageParam.newsArr;
			setupNewsList();
		}
		function setupNewsList(){
			var news = '';
			for(var i = 0; i < zixun_data.length; i++){
	           	var data = zixun_data[i];
	           	var imgPath = data.image;
	           	var newhtml = '';
	         	if(imgPath != null && imgPath != ""){	     
                  	newhtml = '<li class="mui-table-view-cell train-cell" style="padding-right: 10px;padding-left: 10px" onclick="CheckZixunClick('+i+')">'+
						'<img class="hot-train-image" src="'+imgPath+'">'+
						'<div class="hot-train-title-div">'+
							'<p class="base_black_grey base_content_font train-title">'
								+data.cname+
							'</p>'+
							'<p class="base_grey base_tag_font hot-train-time">'+
								getCurrentDay(data.instime)+'&nbsp;&nbsp;'+'长风网'+
							'</p>'+
						'</div>'+
					'</li>';
				}else{
			  		newhtml = '<li class="mui-table-view-cell" style="padding-right: 10px;padding-left: 10px"><p class="item_text_title base_content_font base_black_grey according-2-rows" >'+escape2Html(data.cname).replace(/&/g,'')+'</p>'+
							'</div>'+
			           '</li>';
			 	}
				news = news + newhtml;
	        }
			$("#div_zixun").html(news);
		}
		function CheckZixunClick(i){
        	var connectionType = api.connectionType;
			if (connectionType == 'none') {
	          	ShowToast("暂无网络，请检查网络");
			   	return;
			}
         	var data = zixun_data[i];
            api.openWin({useWKWebView:true,
				name: 'indexLunDetailsWindow',
				url: 'html/HomePage/indexLunDetailsWindow.html',
				pageParam: {
					url: data.detail,
					title : data.cname,
					sourceurl : window.location.pathname,
					sourcetitle : document.title,
					ctitle:'热门资讯详情页',
					Newstype:'HotNews',
					shareurl : data.detail
				}
			});
        }
	</script>
</html>